<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>拍卖详情</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f8f9fa;
            padding: 20px;
        }

        h1 {
            color: #343a40;
        }

        a {
            color: #007bff;
            text-decoration: none;
            margin-bottom: 10px;
            display: inline-block;
        }

        a:hover {
            text-decoration: underline;
        }

        table {
            width: 100%;
            max-width: 700px;
            background-color: white;
            border-collapse: collapse;
            border-radius: 8px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            overflow: hidden;
            margin-bottom: 20px;
        }

        td {
            padding: 12px;
            vertical-align: top;
            border-bottom: 1px solid #dee2e6;
        }

        td:first-child {
            font-weight: bold;
            width: 120px;
            background-color: #f1f3f5;
        }

        img {
            max-width: 100%;
            height: auto;
            border-radius: 4px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.2);
        }

        .actions {
            margin-top: 15px;
        }
    </style>
</head>
<body>
<h1>拍卖详情</h1>
<a href="AuctionServlet?opr=selectAll">返回列表</a>

<table>
    <tr><td>拍卖ID:</td><td>${auction.auctionId}</td></tr>
    <tr><td>拍卖名称:</td><td>${auction.auctionName}</td></tr>
    <tr><td>起拍价:</td><td><fmt:formatNumber value="${auction.auctionStartPrice}" type="currency"/></td></tr>
    <tr><td>底价:</td><td><fmt:formatNumber value="${auction.auctionUpset}" type="currency"/></td></tr>
    <tr><td>开始时间:</td><td><fmt:formatDate value="${auction.auctionStartTime}" pattern="yyyy-MM-dd HH:mm"/></td></tr>
    <tr><td>结束时间:</td><td><fmt:formatDate value="${auction.auctionEndTime}" pattern="yyyy-MM-dd HH:mm"/></td></tr>
    <tr><td>图片:</td><td>
        <c:if test="${not empty auction.auctionPic}">
            <img src="${auction.auctionPic}" width="200"/><br/>
            类型: ${auction.auctionPicType}
        </c:if>
    </td></tr>
    <tr><td>描述:</td><td>${auction.auctionDesc}</td></tr>
</table>

<div class="actions">
    <a href="AuctionServlet?opr=toUpdate&auctionId=${auction.auctionId}">修改</a>
</div>
</body>
</html>
